package com.fowo.api.sys.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fowo.api.sys.entity.SysDepartment;
import com.fowo.api.sys.model.SysDepartmentSearchParamPo;
import com.fowo.api.sys.model.SysDepartmentVo;
import com.fowo.api.sys.model.SysDeptUserVo;

import java.util.List;

public interface SysDepartmentService {
    List<SysDepartmentVo> search(SysDepartmentSearchParamPo search);
    List<SysDepartmentVo> searchTree(SysDepartmentSearchParamPo search);

    List<SysDeptUserVo> deptUserTree(SysDepartmentSearchParamPo search);
    Page<SysDepartmentVo> pageSearch(SysDepartmentSearchParamPo search);

    boolean create(SysDepartment sysDepartment);
    boolean update(SysDepartment sysDepartment);
    boolean delete(Long id);

    SysDepartment getById(Long id);
    Long getIdByName(String name);

}
